//
//  SAAnswerQuestionOptionCell.m
//  SunOn
//
//  Created by RazeenCheng on 2017/5/4.
//  Copyright © 2017年 NeoZhang. All rights reserved.
//

#import "SAAnswerQuestionOptionCell.h"

@implementation SAAnswerQuestionOptionCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}


- (void)configCellWithRow:(NSInteger)row withContent:(NSString *)content withSelected:(BOOL)isSelected;
{    
    self.optionIndexLabel.text = [NSString stringWithFormat:@"%c", (int)(65 + row)];
    self.optionContentLabel.text = content;
    
    [self configCellWithSelected:isSelected];
}


- (void)configCellWithSelected:(BOOL)isSelected
{
    self.isSelected = isSelected;
    
    if (isSelected) {
        // 被选中
        self.backView.layer.borderColor = [[UIColor colorWithHexString:@"0D88E8"] CGColor];
        self.backView.layer.borderWidth = 1;
        
        self.optionContentLabel.textColor = [UIColor colorWithHexString:@"0D88E8"];
    } else {
        // 未被选中
        self.backView.layer.borderWidth = 0;
        
        self.optionContentLabel.textColor = [UIColor colorWithHexString:@"000000"];
    }
}

@end
